import table1 from "./table1.vue";
import table2 from "./table2.vue";

const components = {
  table1,
  table2,
};
export default (app, options) => {
  //函数内部可以注册组件，注入依赖，自定义指令
  if (options && options.length) {
    for (let key in components) {
      if (options.includes(key)) {
        app.component(key, components[key]);
      }
    }
  } else {
    for (let key in components) {
      app.component(key, components[key]);
    }
  }
};
//在vue3自定义指令中使用了